package com.tupu.service.admin;

import cn.hutool.http.server.HttpServerResponse;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.tupu.entity.admin.KnowledgeInfo;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;
import java.util.Map;

public interface KnowledgeListService extends IService<KnowledgeInfo> {

    //删除当前图谱下的所有（实例、标签、关系）
    void deleteByNodeId(Integer node_id);

    //图谱首页、分页、模糊查询
    Page<KnowledgeInfo> pageInfo(String name, Long page, Long size);

    //图谱列表 不分页
    List<KnowledgeInfo> listAll();

    //新增图谱
    void addKnowledge(KnowledgeInfo knowledgeInfo);

    //编辑图谱
    void updateKnowledge(KnowledgeInfo knowledgeInfo);

    //图谱备份
    Map<String, Object> backup(Integer node_id, HttpServerResponse response) throws IOException;

    //上传图片
    Map<String, Object> uploadPicture(MultipartFile file) throws IOException;

    //根据id查找一个图谱(加ip)
    KnowledgeInfo findById(Integer id);
}
